﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;

namespace CSM.DAL
{
	public static class DBUserInfo
	{
		public static DataTable QueryUserInfo(string key)
		{
			DbHelper dbh = new DbHelper();

			string sql = "select * from UserInfo where nick_name=@nick_name";
			List<DbParameter> dbpl = new List<DbParameter>();
			DbParameter dbp = new SqlParameter();
			dbp.DbType = DbType.String;
			dbp.ParameterName = "@nick_name";
			dbp.Value = key;
			dbpl.Add(dbp);

			DataTable dt = dbh.CreateDataTable(sql, dbpl.ToArray());

			return dt;
		}
	}
}
